import request from '@/utils/request'

// 查询oss列表
export function listOss(query) {
  return request({
    url: '/oss/list',
    method: 'get',
    params: query
  })
}

// 分页查询oss列表
export function listOssByPage(query) {
  return request({
    url: '/oss/page',
    method: 'get',
    params: query
  })
}

// 查询oss
export function getOss(id) {
  return request({
    url: '/oss/' + id,
    method: 'get'
  })
}

// 新增oss
export function addOss(data) {
  return request({
    url: '/oss',
    method: 'post',
    data: data
  })
}

// 修改oss
export function updateOss(data) {
  return request({
    url: '/oss',
    method: 'put',
    data: data
  })
}

// 删除oss
export function deleteOss(id) {
  return request({
    url: '/oss/delete/' + id,
    method: 'delete'
  })
}

// 批量新增oss
export function insertOss(data) {
  return request({
    url: '/oss/upload',
    method: 'post',
    data: data
  })
}
